home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Caml Light 0.61 / Source / src / lib / eq.mli < prev    next >
Encoding:
Text File  |  1993-09-24  |  1.1 KB  |  22 lines  |  [TEXT/MPS ]

  1. (* Equality functions *)
  2.  
  3. value prefix = : 'a -> 'a -> bool = 2 "tree_equal"
  4.         (* [e1 = e2] tests for structural equality of [e1] and [e2].
  5.            Mutable structures (e.g. references) are equal if and only if
  6.            their current contents are structurally equal, even if
  7.            the two mutable objects are not the same physical object.
  8.            Equality between functional values raises [Invalid_argument].
  9.            Equality between cyclic data structures may not terminate. *)
  10.   and prefix <> : 'a -> 'a -> bool
  11.         (* Negation of [prefix =]. *)
  12.   and prefix == : 'a -> 'a -> bool = 2 "=="
  13.         (* [e1 == e2] tests for physical equality of [e1] and [e2].
  14.            On integers and characters, it is the same as structural
  15.            equality. On mutable structures, [e1 == e2] is true if and only if
  16.            physical modification of [e1] also affects [e2]. On non-mutable
  17.            structures, the behavior of [prefix ==] is
  18.            implementation-dependent, except that [e1 == e2] implies [e1 = e2]. *)
  19.   and prefix != : 'a -> 'a -> bool = 2 "!="
  20.         (* Negation of [prefix ==]. *)
  21. ;;
  22.